home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9117 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  655 b 

  1. Path: hk.linkage.net!priscilla
  2. From: priscilla@wyvern (Priscilla Ngie)
  3. Newsgroups: comp.lang.c
  4. Subject: Borland sqrt() bug?
  5. Date: 8 Mar 1996 09:14:13 GMT
  6. Organization: LinkAGE Online Ltd.
  7. Message-ID: <4hotp5$a1h@news.hk.linkage.net>
  8. NNTP-Posting-Host: wyvern.hk.linkage.net
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. I tired the following code
  12.  
  13.     float num;
  14.         if (num > 0) sqrt(num);
  15.  
  16. and Borland C++ 4.02 returns me with an error
  17.  
  18.     sqrt: DOMAIN error
  19.  
  20. This error dialog box only pops up when num is a +ve number approaching 
  21. zero, eg 0.000000005.
  22.  
  23. Is this a bug of some kind? If not, how can I trun around this?
  24.  
  25. Priscilla Ngie
  26. Future Solutions
  27. Hong Kong
  28.